package com.xmut.mapper;

import com.xmut.pojo.Appointment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zhangbaiyan
 * @date 2024-06-04 21:10
 * @description:
 * @version:
 */
@Mapper
public interface  AppointmentMapper {
    @Insert("insert into appointment(name, number, department, idcart, time) values (#{name},#{number},#{department},#{idcart},#{time})")
    void insert(Appointment appointment);

    @Select("select * from appointment")
    List<Appointment> getAllHospital();
    @Delete("delete from appointment where id = #{id}")
    void delHospitalById(Integer id);
}
